/*
https://leetcode-cn.com/problems/poor-pigs/solution/ke-lian-de-xiao-zhu-by-leetcode-solution-z0h7/
 */
public class Solution458 {
    public int poorPigs(int buckets, int minutesToDie, int minutesToTest) {
        int state=minutesToTest/minutesToDie+1;
        return (int) Math.ceil(Math.log(buckets)/Math.log(state));
    }

    public static void main(String[] args) {
        System.out.println(new Solution458().poorPigs(1000,15,60));
    }
}
